package com.dimong.loan.sdk.utils;

import android.app.Activity;
import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.mobile.videonews.li.sdk.R;

public class GlideUtil {
    public static void loadImg(Context context, String url, ImageView imageView) {
        if(context == null){
            return;
        }
        if(context instanceof Activity){
            Activity activity = (Activity) context;
            if (activity.isDestroyed()) {
                return;
            }
        }
        Glide.with(context).load(url).error(R.drawable.default_log).placeholder(R.drawable.default_log).dontAnimate().into(imageView);
    }
}
